export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  dialogWidth: '70%',
  showClomnuBtn: false,
  searchSize: 'mini',
  addBtn: true,
  menu: true,
  editBtn: false,
  delBtn: false,
  searchLabelWidth: 100,
  searchMenuSpan: 6,
  labelWidth: 130,
  selection: true,
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    display: false
  }, {
    label: '票种',
    prop: 'ticketType',
    search: true,
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    cascaderItem: ["ticketName"],
    rules: [{
      required: true,
      message: '请选择票种',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '车票名称',
    prop: 'ticketName',
    type: 'select',
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    dicFlag: false,
    rules: [{
      required: true,
      message: '请选择车票名称',
      trigger: 'blur'
    }],
    component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
    search: true,
    display: false
  }, {
    label: '车票次数',
    prop: 'ticketTimes',
    rules: [{
      message: '请输入车票次数',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '车票金额',
    prop: 'ticketPrice',
	type: 'number',
	precision: 2,
    display: false
  }, {
    label: '车票数量(张)',
    prop: 'storageNumber',
    display: false
  }, {
    label: '车票有效期(天)',
    prop: 'activeTime',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '车票用途',
    prop: 'ticketPurpose',
    display: false
  }, {
    label: '流动前票区',
    prop: 'flowBeforeTicketArea',
    type: 'select',
    search: true,
    dicUrl: "support/swpmticketarea/dict",
    props: {
      label: "ticketAreaName",
      value: "id"
    },
    rules: [{
      message: '请输入流动前票区',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '流动后票区',
    prop: 'flowAfterTicketArea',
    type: 'select',
    search: true,
    dicUrl: "support/swpmticketarea/dict",
    props: {
      label: "ticketAreaName",
      value: "id"
    },
    rules: [{
      message: '请输入流动后票区',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '流动原因',
    prop: 'flowReason',
    type:'textarea',
    rules: [{
      message: '请输入流动原因',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '申请时间',
    prop: 'applyTime',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    rules: [{
      required: true,
      message: '请输入申请时间',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '申请时间',
    prop: 'applyTimeDTO',
    type: 'date',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    search:true,
    hide: true,
    display: false,
    showColumn: false
  }, {
    label: '审批状态',
    prop: 'checkStatus',
    type: 'select',
    dicUrl: '/admin/dict/type/check_status',
    search: true,
    searchValue:'0',
    display: false
  }, {
    label: '车票编码员',
    prop: 'applyPersonName',
    type:'select',
    component:'userSelect',
    params:{
      userCodeKey:'applyPersonCode'
    },
    display: false
  }, {
    label: '车票编码员工号',
    prop: 'applyPersonCode',
    display: false,
    disabled:true,
  }, {
    label: '备注',
    prop: 'remark',
    type: 'textarea',
    maxRows: 6,
    minRows: 4,
    span: 24,
    hide: true,
    display: false
  }, {
    label: '创建人ID',
    prop: 'creatorId',
    hide: true,
    display: false
  }, {
    label: '创建人名称',
    prop: 'creatorName',
    hide: true,
    display: false
  }, {
    label: '记录时间',
    prop: 'createTime',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    display: false
  }],
  group: [{
    label: '车票属性',
    column: [{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }]
    }, {
      label: '车票名称',
      prop: 'ticketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      disabled:true,
    }, {
      label: '车票金额',
      prop: 'ticketPrice',
	  type: 'number',
	  precision: 2,
      disabled:true,
    }, {
      label: '车票数量(张)',
      prop: 'storageNumber',
      type: 'number',
      rules: [{
        required: true,
        message: '请输入车票数量',
        trigger: 'blur',
      }]
    }, {
      label: '车票有效期（天）',
      prop: 'activeTime',
      type: 'number',
      precision: 0
    }, {
      label: '车票用途',
      prop: 'ticketPurpose',
      type: 'input',
    },],
  },
  {
    label: '票卡流动信息',
    column: [{
      label: '流动前票区',
      prop: 'flowBeforeTicketArea',
      type: 'select',
      dicUrl: "support/swpmticketarea/dict",
      props: {
        label: "ticketAreaName",
        value: "id"
      },
      rules: [{
        required: true,
        message: '请选择流动前票区',
        trigger: 'blur'
      }]
    }, {
      label: '流动后票区',
      prop: 'flowAfterTicketArea',
      type: 'select',
      dicUrl: "support/swpmticketarea/dict",
      props: {
        label: "ticketAreaName",
        value: "id"
      },
      rules: [{
        required: true,
        message: '请选择流动后票区',
        trigger: 'blur'
      }]
    }, {
      label: '流动原因',
      prop: 'flowReason',
      type:'textarea',
      span: 24
    },],
  },
  {
    label: '申请人',
    column: [{
      label: '车票编码员',
      prop: 'applyPersonName',
      type:'select',
      rules: [{
        required: true,
        message: '请输入申请人',
        trigger: 'blur'
      }],
      component:'userSelect',
      params:{
        userCodeKey:'applyPersonCode'
      },
      disabled: true
    }, {
      label: '车票编码员工号',
      prop: 'applyPersonCode',
       disabled:true,
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      maxRows: 6,
      minRows: 4,
      span: 24,
      hide: true
    },],
  },
  ],
};

export const tableOptionViewNo = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  dialogWidth: '70%',
  showClomnuBtn: false,
  searchSize: 'mini',
  addBtn: true,
  editBtn: false,
  delBtn: false,
  menu: true,
  searchLabelWidth: 100,
  searchMenuSpan: 6,
  labelWidth: 130,
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    display: false
  }, {
    label: '票种',
    prop: 'ticketType',
    search: true,
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    cascaderItem: ["ticketName"],
    rules: [{
      required: true,
      message: '请选择票种',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '车票名称',
    prop: 'ticketName',
    type: 'select',
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    dicFlag: false,
    rules: [{
      required: true,
      message: '请选择车票名称',
      trigger: 'blur'
    }],
    component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
    display: false
  }, {
    label: '车票次数',
    prop: 'ticketTimes',
    rules: [{
      message: '请输入车票次数',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '车票金额',
    prop: 'ticketPrice',
	type: 'number',
	precision: 2,
    display: false
  }, {
    label: '车票数量(张)',
    prop: 'storageNumber',
    display: false
  }, {
    label: '车票有效期',
    prop: 'activeTime',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '车票用途',
    prop: 'ticketPurpose',
    display: false
  }, {
    label: '流动前票区',
    prop: 'flowBeforTicketArea',
    type: 'select',
    search: true,
    dicUrl: "support/swpmticketarea/dict",
    props: {
      label: "ticketAreaName",
      value: "id"
    },
    rules: [{
      message: '请输入流动前票区',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '流动后票区',
    prop: 'flowAfterTicketArea',
    type: 'select',
    search: true,
    dicUrl: "support/swpmticketarea/dict",
    props: {
      label: "ticketAreaName",
      value: "id"
    },
    rules: [{
      message: '请输入流动后票区',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '流动原因',
    prop: 'flowReason',
    type:'textarea',
    rules: [{
      message: '请输入流动原因',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '申请时间',
    prop: 'applyTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    rules: [{
      required: true,
      message: '请输入申请时间',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '审批状态',
    prop: 'checkStatus',
    type: 'select',
    dicUrl: '/admin/dict/type/check_status',
    search: true,
    display: false
  }, {
    label: '车票编码员',
    prop: 'applyPersonName',
    type:'select',
    component:'user-select',
    params:{
      userCodeKey:'applyPersonCode'
    },
    display: false
  }, {
    label: '车票编码员工号',
    prop: 'applyPersonCode',
    display: false,
    disabled:true,
  }, {
    label: '备注',
    prop: 'remark',
    type: 'textarea',
    maxRows: 6,
    minRows: 4,
    span: 24,
    hide: true,
    display: false
  }, {
    label: '创建人ID',
    prop: 'creatorId',
    hide: true,
    display: false
  }, {
    label: '创建人名称',
    prop: 'creatorName',
    hide: true,
    display: false
  }, {
    label: '记录时间',
    prop: 'createTime',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    display: false
  }],
  group: [
    {
    label: '车票属性',
    column: [{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }]
    }, {
      label: '车票名称',
      prop: 'ticketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      disabled:true,
    }, {
      label: '车票金额',
      prop: 'ticketPrice',
	  type: 'number',
	  precison: 2,
      disabled:true,
    }, {
      label: '车票数量(张)',
      prop: 'storageNumber',
      rules: [{
        message: '请输入车票张数',
        trigger: 'blur'
      }]
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      type: 'number',
      precision: 0
    }, {
      label: '车票用途',
      prop: 'ticketPurpose',
      type: 'input',
    },],
  },
  {
    label: '票卡流动信息',
    column: [{
      label: '流动前票区',
      prop: 'flowBeforeTicketArea',
      type: 'select',
      dicUrl: "support/swpmticketarea/dict",
      props: {
        label: "ticketAreaName",
        value: "id"
      },
    }, {
      label: '流动后票区',
      prop: 'flowAfterTicketArea',
      type: 'select',
      dicUrl: "support/swpmticketarea/dict",
      props: {
        label: "ticketAreaName",
        value: "id"
      },
    }, {
      label: '流动原因',
      prop: 'flowReason',
      type:'textarea',
    },],
  },
  {
    label: '申请人',
    column: [{
      label: '车票编码员',
      prop: 'applyPersonName',
      type:'select',
      rules: [{
        required: true,
        message: '请输入申请人',
        trigger: 'blur'
      }],
      component:'user-select',
      params:{
        userCodeKey:'applyPersonCode'
      },
    }, {
      label: '车票编码员工号',
      prop: 'applyPersonCode',
       disabled:true,
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      maxRows: 6,
      minRows: 4,
      span: 24,
      hide: true
    },],
  },
  ],
};
export const tableOptionViewYes = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  dialogWidth: '70%',
  showClomnuBtn: false,
  searchSize: 'mini',
  addBtn: true,
  editBtn: false,
  delBtn: false,
  menu: true,
  searchLabelWidth: 100,
  searchMenuSpan: 6,
  labelWidth: 130,
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    display: false
  }, {
    label: '票种',
    prop: 'ticketType',
    search: true,
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    cascaderItem: ["ticketName", "ticketPurpose"],
    rules: [{
      required: true,
      message: '请选择票种',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '车票名称',
    prop: 'ticketName',
    type: 'select',
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    dicFlag: false,
    rules: [{
      required: true,
      message: '请选择车票名称',
      trigger: 'blur'
    }],
    component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
    display: false
  }, {
    label: '车票次数',
    prop: 'ticketTimes',
    rules: [{
      message: '请输入车票次数',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '车票金额',
    prop: 'ticketPrice',
	type: 'number',
	precision: 2,
    display: false
  }, {
    label: '车票数量(张)',
    prop: 'storageNumber',
    display: false
  }, {
    label: '车票有效期',
    prop: 'activeTime',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '车票用途',
    prop: 'ticketPurpose',
    display: false
  }, {
    label: '流动前票区',
    prop: 'flowBeforTicketArea',
    type: 'select',
    search: true,
    dicUrl: "support/swpmticketarea/dict",
    props: {
      label: "ticketAreaName",
      value: "id"
    },
    rules: [{
      message: '请输入流动前票区',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '流动后票区',
    prop: 'flowAfterTicketArea',
    type: 'select',
    search: true,
    dicUrl: "support/swpmticketarea/dict",
    props: {
      label: "ticketAreaName",
      value: "id"
    },
    rules: [{
      message: '请输入流动后票区',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '流动原因',
    prop: 'flowReason',
    type:'textarea',
    rules: [{
      message: '请输入流动原因',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '申请时间',
    prop: 'applyTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    rules: [{
      required: true,
      message: '请输入申请时间',
      trigger: 'blur'
    }],
    display: false
  }, {
    label: '审批状态',
    prop: 'checkStatus',
    type: 'select',
    dicUrl: '/admin/dict/type/check_status',
    search: true,
    display: false
  }, {
    label: '车票编码员',
    prop: 'applyPersonName',
    type:'select',
    component:'userSelect',
    params:{
      userCodeKey:'applyPersonCode'
    },
    display: false
  }, {
    label: '车票编码员工号',
    prop: 'applyPersonCode',
    display: false,
    disabled:true,
  }, {
    label: '备注',
    prop: 'remark',
    type: 'textarea',
    maxRows: 6,
    minRows: 4,
    span: 24,
    hide: true,
    display: false
  }, {
    label: '创建人ID',
    prop: 'creatorId',
    hide: true,
    display: false
  }, {
    label: '创建人名称',
    prop: 'creatorName',
    hide: true,
    display: false
  }, {
    label: '记录时间',
    prop: 'createTime',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm:ss',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    display: false
  }],
  group: [
    {
    label: '车票属性',
    column: [{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }]
    }, {
      label: '车票名称',
      prop: 'ticketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice',
      ticketCountKey: 'ticketTimes'
    },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      disabled:true,
    }, {
      label: '车票金额',
      prop: 'ticketPrice',
	  type: 'number',
	  precision: 2,
      disabled:true,
    }, {
      label: '车票数量(张)',
      prop: 'storageNumber',
      rules: [{
        message: '请输入车票张数',
        trigger: 'blur'
      }]
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      type: 'number',
      precision: 0
    }, {
      label: '车票用途',
      prop: 'ticketPurpose',
      type: 'input',
    },],
  },
  {
    label: '票卡流动信息',
    column: [{
      label: '流动前票区',
      prop: 'flowBeforeTicketArea',
      type: 'select',
      dicUrl: "support/swpmticketarea/dict",
      props: {
        label: "ticketAreaName",
        value: "id"
      },
    }, {
      label: '流动后票区',
      prop: 'flowAfterTicketArea',
      type: 'select',
      dicUrl: "support/swpmticketarea/dict",
      props: {
        label: "ticketAreaName",
        value: "id"
      },
    }, {
      label: '流动原因',
      prop: 'flowReason',
      type:'textarea',
    },],
  },
  {
    label: '申请人',
    column: [{
      label: '车票编码员',
      prop: 'applyPersonName',
      type:'select',
      rules: [{
        required: true,
        message: '请输入申请人',
        trigger: 'blur'
      }],
      component:'user-select',
      params:{
        userCodeKey:'applyPersonCode'
      },
    }, {
      label: '车票编码员工号',
      prop: 'applyPersonCode',
       disabled:true,
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      maxRows: 6,
      minRows: 4,
      span: 24,
      hide: true
    },],
  },
    {
    label: '审批情况',
    column: [ {
      label: '审批状态',
      prop: 'checkStatus',
      type: 'select',
      dicUrl: '/admin/dict/type/check_status',
    }, {
      label: '审批建议',
      prop: 'remark',
      type: 'textarea',
      span: 24,
    },],
  },
  ],
};
